import request from '@/utils/request'
// 获取角色名单
export const getRoles = params => request.get('/sys/role', { params })
// 获取已启用的角色
export const getRolesEnabled = () => request.get('/sys/role/list/enabled')
// 添加名单
export const addRoles = data => request.post('/sys/role', data)

export const getPermissById = id => request.get('/sys/role/' + id)
// 确认编辑
/**
 *
 * @param {*} data (id,name,state,description)
 * @returns
 */
export const editRoles = data => request.put('/sys/role/' + data.id, data)
// 编辑
/**
 *
 * @param {*} data
 * @returns
 */
export const delRoles = id => request.delete('/sys/role/' + id)
